package com.pk.flink.scenario01.bean;

import lombok.Data;

import javax.management.MXBean;

/**
 * 未找到元素实体
 *
 *   {
 *     "recordNumber": 2401,
 *     "createdTime": "2025-11-17 09:12:10",
 *     "webpageResource": "Amazon",
 *     "pageUrl": "https://advertising.amazon.es/campaign-manager",
 *     "elementName": "语言选择搜索框",
 *     "elementXPath": "body div#a-page div#sc-navbar-container \u003e div \u003e div:nth-of-type(1) div#navbar \u003e div:nth-of-type(3) \u003e div \u003e div:nth-of-type(3) \u003e div \u003e div:nth-of-type(2) \u003e div:nth-of-type(1) \u003e div \u003e div \u003e div:nth-of-type(1)",
 *     "vd": "36-小众-匈牙利(小众4)",
 *     "ip": "45.128.234.136",
 *     "shop": "主327EU_EU（本土）",
 *     "visitTime": "2025-11-17 09:12:10",
 *     "message": "未找到要监控的页面元素：\r\n网页资源：Amazon\r\n网页URL：https://advertising.amazon.es/campaign-manager\r\n网页元素：语言选择搜索框\r\n网页元素XPath：body div#a-page div#sc-navbar-container \u003e div \u003e div:nth-of-type(1) div#navbar \u003e div:nth-of-type(3) \u003e div \u003e div:nth-of-type(3) \u003e div \u003e div:nth-of-type(2) \u003e div:nth-of-type(1) \u003e div \u003e div \u003e div:nth-of-type(1)\r\nVD：36-小众-匈牙利(小众4)\r\nIP：45.128.234.136\r\n店铺：主327EU_EU（本土）\r\n访问时间：2025-11-17 09:12:10"
 *   },
 */
@Data
public class NotFoundElement {

    private Integer recordNumber;
    private String createdTime;
    private String webpageResource;
    private String pageUrl;
    private String elementName;
    private String elementXPath;
    private String vd;
    private String ip;
    private String shop;
    private String visitTime;
    private String message;

    public NotFoundElement() {
    }

    public NotFoundElement(Integer recordNumber, String createdTime, String webpageResource, String pageUrl,
            String elementName, String elementXPath, String vd, String ip, String shop, String visitTime,
            String message) {
        this.recordNumber = recordNumber;
        this.createdTime = createdTime;
        this.webpageResource = webpageResource;
        this.pageUrl = pageUrl;
        this.elementName = elementName;
        this.elementXPath = elementXPath;
        this.vd = vd;
        this.ip = ip;
        this.shop = shop;
        this.visitTime = visitTime;
        this.message = message;
    }

    @Override
    public String toString() {
        return "NotFoundElement{" +
                "recordNumber=" + recordNumber +
                ", createdTime='" + createdTime + '\'' +
                ", webpageResource='" + webpageResource + '\'' +
                ", pageUrl='" + pageUrl + '\'' +
                ", elementName='" + elementName + '\'' +
                ", elementXPath='" + elementXPath + '\'' +
                ", vd='" + vd + '\'' +
                ", ip='" + ip + '\'' +
                ", shop='" + shop + '\'' +
                ", visitTime='" + visitTime + '\'' +
                ", message='" + message.replace("\n", "").replace("\r", "") + '\'' +
                '}';
    }
}
